package com.hh.game.common.base.manager.notice.impl;

import com.hh.game.common.base.manager.notice.NoticeProducer;

public class NoticeProducerImpl implements NoticeProducer {
//    private DefaultMQProducer producer;
//
//
//    public NoticeProducerImpl(DefaultMQProducer producer) {
//        this.producer = producer;
//    }
//
//    @Override
//    public void notice(int userId ,String route, Object data) throws Exception {
//        JSONObject obj = new JSONObject();
//        obj.put(NoticeConstant.MESSAGE_RECEPTOR_KEY ,userId);
//        obj.put(NoticeConstant.MESSAGE_TO_CLIENT_ROUTE_KEY ,route);
//        obj.put(NoticeConstant.MESSAGE_TO_CLIENT_DATA_KEY ,data);
//        Message message = new Message(NoticeConstant.TOPIC, NoticeConstant.TAG_NOTICE, obj.toJSONString().getBytes());
//        producer.send(message);
//    }
//
//    @Override
//    public void broadcast(String route ,Object data) throws Exception {
//        JSONObject obj = new JSONObject();
//        obj.put(NoticeConstant.MESSAGE_TO_CLIENT_ROUTE_KEY ,route);
//        obj.put(NoticeConstant.MESSAGE_TO_CLIENT_DATA_KEY ,data);
//        Message message = new Message(NoticeConstant.TOPIC, NoticeConstant.TAG_BROADCAST, obj.toJSONString().getBytes());
//        producer.send(message);
//    }
}
